<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<jsp:include page="../layout/topPg.jsp" />

<!-- INI listUsersPg -->
	
	<table id="usersTable">
		<tr>
			<th id="usersTable_th_username">Username</th>
			<!--
			<th id="usersTable_th_admin">Mail</th>
			 -->
			<th id="usersTable_th_admin">Admin</th>
			<th id="usersTable_th_admin">Data Alta</th>
			<th id="usersTable_th_songs">Not played</th>
			<th id="usersTable_th_songs">Bad</th>
			<th id="usersTable_th_songs">Medium</th>
			<th id="usersTable_th_songs">Good</th>
			<th id="usersTable_th_songs">Record</th>
			<th id="usersTable_th_songs">Cover</th>
			<th id="usersTable_th_actions">Actions</th>
		</tr>
		<c:forEach var="us" items="${users}" varStatus="loopCount">
			<tr>
				<td>${us.username}</td>
				<!--
				<td>${us.mail}</td>
				 -->
				<c:if test="${us.admin}">
					<td>
						<img class="imgTaula" src="../images/true.png" alt="Cover"/>
					</td>
				</c:if>
				<c:if test="${!us.admin}">
					<td>
						<img class="imgTaula" src="../images/false.png" alt="Cover"/>
					</td>
				</c:if>
				<td>${us.dataAltaStr}</td>
				<td>${us.level0}</td>
				<td>${us.level1}</td>
				<td>${us.level2}</td>
				<td>${us.level3}</td>
				<td>${us.level4}</td>
				<td>${us.level5}</td>
				<td>
					<c:if test="${us.username == user.username}">
						<a href="../users/editUser.html">
							<img class="imgTaula" src="../images/buttons/edit.png" alt="Edit"/>
						</a>
					</c:if>
					<c:if test="${us.username != user.username}">
						<a href="../users/${us.username}mySongs.html">
							<img class="imgTaula" src="../images/buttons/detail.png" alt="Edit"/>
						</a>
					</c:if>
					
				</td>
			</tr>
		</c:forEach>
	</table>
	
<!-- FI listUsersPg -->

<jsp:include page="../layout/footerPg.jsp" />
